<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>借钱贷</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" href="../../css/main.css" />
    <script src="../../script/vue.min.js"></script>
    <style type="text/css">
    html,
    body {
        height: 100%;
    }

    #menuTwo {
        height: 100%;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-flex-flow: column;
        flex-flow: column;
    }
    #header {
        background: #fbdb0a;
        color: #000;
        border-bottom: #b2b2b2 solid 1px;
    }
    #main {
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        flex: 1;
    }




    </style>
</head>

<body>
    <div id="menuTwo" v-cloak>
        <header id="header" class="aui-bar aui-bar-nav">
          <a class="aui-pull-left">
            <span class="aui-iconfont aui-icon-left" style="color:#000" @click="leftWin" id="headerBack"></span>
          </a>
          <div class="aui-title" id="headerText">{{typetext}}</div>
        </header>
        <div id="main" class="flex-con"></div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script src="../../script/jquery.min.js"></script>
<script type="text/javascript">
apiready = function() {
    open()
    var vm = new Vue({
        el: '#menuTwo',
        data: {
            typetext: ''
        },
        methods: {
            wait: function() {
                api.setRefreshHeaderInfo({
                    visible: true,
                    // loadingImg: '../image/timg.gif',
                    bgColor: '#fafafa',
                    textColor: '#323232',
                    textDown: '下拉刷新...',
                    textUp: '松开立即刷新...',
                    showTime: true
                }, function(ret, err) {
                    setTimeout('api.refreshHeaderLoadDone()', '500');
                })
            },
            leftWin: function() {
                api.closeWin();
                api.openWin({
                    name: 'home',
                    url: 'home.html'
                });
            }
        },
        created: function() {
            this.wait()
        },
        mounted: function() {
          var typetext = api.getGlobalData({
            key: 'typetext'
          });
          this.typetext = typetext
        }
    })
};

var header, headerPos, main, mainPos

function open() {
    header = $api.byId('header');
    //适配iOS 7+，Android 4.4+状态栏
    $api.fixStatusBar(header);
    headerPos = $api.offset(header);
    main = $api.byId('main');
    mainPos = $api.offset(main);
    api.openFrame({
        name: 'typelist_frame',
        url: 'typelist_frame.html',
        bounces: true,
        rect: {
            x: 0,
            y: headerPos.h,
            w: 'auto',
        }
    });

}
</script>

</html>
